package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EduTeacherMapper;
import com.ruoyi.system.domain.EduTeacher;
import com.ruoyi.system.service.IEduTeacherService;
import com.ruoyi.common.core.text.Convert;

/**
 * 教师Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-18
 */
@Service
public class EduTeacherServiceImpl implements IEduTeacherService 
{
    @Autowired
    private EduTeacherMapper eduTeacherMapper;

    /**
     * 查询教师
     * 
     * @param teacherId 教师主键
     * @return 教师
     */
    @Override
    public EduTeacher selectEduTeacherByTeacherId(Long teacherId)
    {
        return eduTeacherMapper.selectEduTeacherByTeacherId(teacherId);
    }

    /**
     * 查询教师列表
     * 
     * @param eduTeacher 教师
     * @return 教师
     */
    @Override
    public List<EduTeacher> selectEduTeacherList(EduTeacher eduTeacher)
    {
        return eduTeacherMapper.selectEduTeacherList(eduTeacher);
    }

    @Override
    public List<EduTeacher> selectTeacherAll() {
        return eduTeacherMapper.selectEduTeacherAll();
    }

    /**
     * 新增教师
     * 
     * @param eduTeacher 教师
     * @return 结果
     */
    @Override
    public int insertEduTeacher(EduTeacher eduTeacher)
    {
        return eduTeacherMapper.insertEduTeacher(eduTeacher);
    }

    /**
     * 修改教师
     * 
     * @param eduTeacher 教师
     * @return 结果
     */
    @Override
    public int updateEduTeacher(EduTeacher eduTeacher)
    {
        return eduTeacherMapper.updateEduTeacher(eduTeacher);
    }

    /**
     * 批量删除教师
     * 
     * @param teacherIds 需要删除的教师主键
     * @return 结果
     */
    @Override
    public int deleteEduTeacherByTeacherIds(String teacherIds)
    {
        return eduTeacherMapper.deleteEduTeacherByTeacherIds(Convert.toStrArray(teacherIds));
    }

    /**
     * 删除教师信息
     * 
     * @param teacherId 教师主键
     * @return 结果
     */
    @Override
    public int deleteEduTeacherByTeacherId(Long teacherId)
    {
        return eduTeacherMapper.deleteEduTeacherByTeacherId(teacherId);
    }
}
